package com.tuanzhang.example.provider.controller;


import com.tuanzhang.example.api.dto.UserDTO;
import com.tuanzhang.example.api.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserService userService;


    /**
     * 获取用户
     * @return
     */
    @GetMapping("user")
    public UserDTO user(){
        return userService.queryByUserId(1);
    }
}
